#ifndef CONFIGDIALOG_H
#define CONFIGDIALOG_H

#include <QtCore/QObject>
#include <QtGui/QDialog>
#include <QtGui/QMessageBox>
#include <QtGui/QLineEdit>
#include <Qt/QFile.h>
#include <Qt/QDir.h>
#include <Qt/QTextstream.h>

#include "ui_configdialog.h"
#include "IGUICallback.h"
#include "../Graphics/ConfigStructs.h"
#include "../GUI/QLineEditEx.h"

namespace Ui
{
    class Dialog;
}


enum UpdateWhat
{
	ServerLog,
	ChatWin
};

class ConfigDialog : public QDialog, IGUICallback
{
    Q_OBJECT

public:
    ConfigDialog(QWidget *parent = 0);
    ~ConfigDialog();
	void UpdateChatWindow(const char* strUpdate);
	void UpdateServerLog(const char* strUpdate);

public slots:
	void SendChatMessage();
	void AttemptConnection();
	void AttemptServerStart();
	void UpdateGUI(const char* text, UpdateWhat uwUpdate);
	void saveConfig();
	void setConfig(ConfigContainer *configContainer);

signals:
	void SendUpdateGUI(const char* text, UpdateWhat uwUpdate);

private:
	Ui::Dialog *ui;
	Ui_Dialog *ThisUI;
	QString strYes;
	QString strNo;

public:
	QLineEditEx *test;
};

#endif // MAINWINDOW_H
